<?php
/*
Template Name: responsible
*/
?>

<?php get_header(); ?>


<div class="page-w sub-banner mb20" style="background-image: url(<?php echo get_template_directory_uri(); ?>/images/responsible-banner.jpg)"></div>
<!--list-->
<div class="main-con ui-tabs mb20 clearfix">
  <ul class="fl clearfix">
    <li class="active"><a>公益活动</a></li>
  </ul>
</div>
<div class="main-con sub-list1 mb20 clearfix">
  <div class="left-nav">
    <ul>
      <?php

      ?>
      <li><a class="nav-header active">项目动态<span class="fr">&gt;</span></a><a>2018</a><a>2017</a><a>2016</a><a>2015</a><a>2014</a><a>2013</a><a>2012</a></li>
      <li><a class="nav-header">冬日送暖<span class="fr">&gt;</span></a><a>2018</a><a>2017</a><a>2016</a><a>2015</a><a>2014</a><a>2013</a><a>2012</a></li>
    </ul>
  </div>
  <div class="list-con">
    <div class="lists">
      <ul>
         <?php
             $cat=get_category_by_slug('responsible-project');
             $posts = get_posts( "category__in=".$cat->term_id."&numberposts=5&orderby=post_title&order=ASC" );
             if( $posts ) :
                 foreach( $posts as $post ) : setup_postdata( $post );
         ?>
             <li><a href="<?php the_permalink();?>"><img src="<?php echo get_first_image($post); ?>" style="width:160px;height:150px" alt="" title="" />
                   <h5><?php the_title(); ?></h5>
                   <p><?php the_excerpt(); ?></p>
                 </a>
                   <div class="news-info"><span><?php the_time('Y-m-d'); ?></span><span class="browse">105</span></div>
             </li>
         <?php
             endforeach;
             endif;
         ?>

      </ul>
    </div>
    <div class="pages clearfix">
      <ul class="fr clearfix">
        <li class="disabled"><a>首页</a></li>
        <li class="disabled"><a>上一页</a></li>
        <li class="active"><a>1</a></li>
        <li><a href="#page-2" >2</a></li>
        <li><a href="#page-3" >3</a></li>
        <li><a href="#page-4" >4</a></li>
        <li><a href="#page-5" >5</a></li>
        <li><a href="#">下一页</a></li>
        <li><a href="#">尾页</a></li>
      </ul>
    </div>
  </div>
</div>
<!--footer-->
<?php get_footer(); ?>
</body>
</html>
